<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>有惊无险</title>
    <%@include file="/static/common/commom.jsp" %>
    <script type="text/javascript" src="/static/js/index.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/css/buttons.css" />
</head>
<script type="text/javascript">

    $(function () {

        //菜单跳转
        $("li").click(function () {
            var url = $(this).data("url");
            console.log($(this).text);
            if (url) {
                var exists = $("#myTabs").tabs('exists', $(this).text());
                if (exists) {
                    $("#myTabs").tabs('select', $(this).text());
                } else {
                    $("#myTabs").tabs("add", {
                        title: $(this).text(),
                        content: '<iframe src=' + url + ' height="100%" width="100%" frameborder="0"></iframe>',
                        closable: true
                    })
                }
            }
        })

        $(".btn_logout").click(function () {
            $.messager.confirm('确认对话框', '您想要退出该系统吗？', function (r) {
                if (r) {
                    window.location.href = "/logout.do";
                }
            })
        });

        //屏蔽右键
        $(document).bind("contextmenu", function (e) {
            return false;
        });

        //生成右键菜单
        $('#myTabs').tabs({
            onContextMenu: function (e, title, index) {
                //选中标签
                $('#myTabs').tabs('select', index);
                //显示右键菜单
                $('#rm').menu('show', {
                    left: e.pageX,
                    top: e.pageY
                });
            }
        });

        //为每个菜单绑定点击事件
        //关闭选中标签之外的标签
        $("#closeOthers").click(function () {
            //获取所有标签
            var tabs = $("#myTabs").tabs("tabs");
            console.log(tabs);
            var length = tabs.length;
            //获取选中标签的索引
            var tab = $('#myTabs').tabs('getSelected');
            var index = $('#myTabs').tabs('getTabIndex', tab);
            //关闭选中标签之前的标签
            for (var i = 0; i < index; i++) {
                $("#myTabs").tabs("close", 0);
            }
            //关闭选中标签之后的标签
            for (var i = 0; i < length - index - 1; i++) {
                $("#myTabs").tabs("close", 1);
            }
        });

        //关闭所有标签
        $("#closeAll").click(function () {
            var tabs = $("#myTabs").tabs("tabs");
            var length = tabs.length;
            for (var i = 0; i < length; i++) {
                $("#myTabs").tabs("close", 0);
            }
        });
    });
</script>
<body id="main" class="easyui-layout">
<div id="rm" class="easyui-menu" style="width:120px;">
    <div id="closeOthers" name="closeOthers" data-options="iconCls:'icon-no'">关闭其它</div>
    <div id="closeAll" name="closeAll" data-options="iconCls:'icon-cancel'">关闭所有</div>
</div>


<div data-options="region:'north',border:false" class="super-north">
    <!--顶部-->
    <div class="super-navigation">
        <!--系统名称-->
        <div class="super-navigation-title">有惊无险</div>
        <!--自定义导航-->
        <iframe id="fancybox-frame" name="fancybox-frame1529158625684" frameborder="0" scrolling="no" hspace="0"  src="http://i.tianqi.com/index.php?c=code&a=getcode&id=34&h=25&w=280"></iframe>
        <div class="super-navigation-main">
            <div class="super-setting-left">
                <ul>
                </ul>
            </div>
            <div class="super-setting-right">
                <ul>
                    <li class="user btn_logout">
                        <span class="user-icon"><img src="/static/images/nn.jpg"/></span><shiro:principal
                            property="username"></shiro:principal>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
<div data-options="region:'west',title:'管理模块',border:false" class="super-west">
    <!--左侧导航-->
    <div class="easyui-accordion" id="myTree" data-options="border:false,fit:true,selected:true">
        <div title="客户管理" data-options="iconCls:'fa fa-desktop'">
            <ul>
                <li data-url='/client/pc.do'>潜在客户管理</li>
                <li data-url='/client/fc.do'>正式客户管理</li>
                <li data-url='/client/pool.do'>客户资源池</li>
                <li data-url='/transferRecord/view.do'>客户移交记录</li>
                <li data-url='/lossRecord/false.do'>客户开发失败</li>
                <li data-url='/lossRecord/loss.do'>客户流失</li>
                <shiro:hasPermission name="clientDevelop:develop">
                    <li data-url='/clientDevelop/develop.do'>潜在客户开发计划</li>
                </shiro:hasPermission>
                <shiro:hasPermission name="clientDevelop:followUp">
                    <li data-url='/clientDevelop/followUp.do'>正式客户跟进</li>
                </shiro:hasPermission>
            </ul>
        </div>
        <div title="信息管理" data-options="iconCls:'fa fa-wpforms'">
            <ul>
                <li data-url='/company/view.do'>机构信息</li>
                <li data-url='/product/view.do'>产品信息</li>
                <li data-url="/car/view.do">车辆信息</li>
            </ul>
        </div>
        <div title="保单管理" data-options="iconCls:'fa fa-window-maximize'">
            <ul>
                <li data-url='/insure/view.do'>车险投保</li>
                <li data-url='/temOrder/view.do'>暂存单</li>
                <li data-url="/backOrder/view.do">退回单</li>
                <li data-url="/checkOrder/view.do">待审核单</li>
                <li data-url="/billRecord/view.do">单据历史记录</li>
            </ul>
        </div>
        <div title="见费出单" data-options="iconCls:'fa fa-table'">
            <ul>
                <li data-url='/fees/payfee.do'>缴费处理</li>
                <li data-url='/fees/collectfee.do'>收费查询</li>
            </ul>
        </div>
        <div title="理赔管理" data-options="iconCls:'fa fa-table'">
            <ul>
                <li data-url='/caseReportBill/view.do'>报案报案管理</li>
                <li data-url='/caseReportBillItem/view.do'>事故报案明细单</li>
                <li data-url='/toBeAuditedBill/view.do'>事故理赔申请管理</li>
                <li data-url='/clientRepaymentInfo/view.do'>客户理赔理赔通知管理</li>
            </ul>
        </div>
        <div title="员工管理" data-options="iconCls:'fa fa-sitemap'">
            <ul>
                <li data-url='/attendance/view.do'>考勤管理</li>
                <li data-url='/task/view.do'>任务管理</li>
                <li data-url='/salary/view.do'>薪资管理</li>
            </ul>
        </div>
        <div title="报表管理" data-options="iconCls:'fa fa-table'">
            <ul>
                <li data-url='/report/sales.do'>销售报表</li>
                <li data-url='/report/claim.do'>理赔报表</li>
            </ul>
        </div>
        <div title="系统管理" data-options="iconCls:'fa fa-desktop'">
            <ul>
                <li data-url='/employee/view.do'>员工管理</li>
                <li data-url='/department/view.do'>部门管理</li>
                <li data-url='/permission/view.do'>权限管理</li>
                <li data-url='/menu/view.do'>菜单管理</li>
                <li data-url='/role/view.do'>角色管理</li>
                <li data-url='/dictionary/view.do'>数据字典</li>
            </ul>
        </div>
    </div>
</div>
<div data-options="region:'center'" style="padding-top: 2px;">
    <!--主要内容-->
    <div id="myTabs" class="easyui-tabs" data-options="border:false,fit:true">
        <div title="首页" data-options="iconCls:'fa fa-home'" >
            <div style="padding: 20px; ">
                <div style="text-align: center; color: #600;">
                    <img src="/static/images/scp_logo.jpg">
                    <div class="unmargined">
                        <p>警告：资料库属于</p>
                    </div>
                    <div class="unmargined" style="font-size: 400%; font-weight: bold; margin: 2px 0 5px;">
                        <p>高度机密</p>
                    </div>
                    <div class="unmargined">
                        <p>严禁未经授权的人员进行访问<br/>
                            肇事者将被监控，定位并处理</p>
                    </div>
                </div>
            </div>
            <br>
            <br>
            <br>
            <br>
            <br>
            <p>
                <a  style="margin-left: 40px" href="javascript:signIn()" class="button button-3d button-primary button-rounded">快速签到</a>
                <a  style="margin-left: 20px" href="javascript:signOut()" class="button button-3d button-primary button-rounded">快速签退</a>
            </p>
        </div>
    </div>
</div>
<div data-options="region:'south'" class="super-south" style="background:#ff8f05;">
    <!--页脚-->
    <div class="super-footer-info">
        <span><i class="fa fa-info-circle"></i>Ahunalien</span>
        <span><i class="fa fa-copyright"></i> 版权所有 <i class="fa fa-caret-right"></i></span>
    </div>
</div>

</body>
</html>